1) Field of the Invention
The present invention relates to a bar code reading method and a bar code reader each used for terminal equipment such as point of sales (POS) terminal.
2) Description of the Related Art
FIG. 12 is a block diagram showing a configuration of the bar code reading device (bar code reader). Referring now to FIG. 12, numeral 31 represents a bar code printed on a surface of an article, the bar code being generally formed of plural black bars and white bars arranged alternately. A predetermined datum is represented based on the width of each black bar and the width of each white bar.
An optical system 32 irradiates a laser beam L2 onto the bar code 31 and receives a reflected light R1, or a laser beam L2 reflected on the bar code 31. The optical system 32 also is constituted of a laser emitting unit 33, a scanning mechanism 34, and an optical converting unit 35. The laser emitting unit 33 includes a semiconductor laser device for emitting the laser beam L1.
The scanning mechanism 34 is constituted of a polygon mirror that is rotatably driven with, for example, a motor. The scanning mechanism 34 also irradiates the laser beam L2 to the plural black bars and white bars forming the bar code 31, the beam L2 formed by reflecting the laser beam L1 from the laser emitting unit 33, while it moves and scans the laser beam at a fixed rate and in the direction perpendicular to the black and white bars of the bar code 31.
The scanning mechanism 34 irradiates the reflected light R1 as the reflected light R2 to the photoelectric converting unit 35, the reflected light R1 being the laser beam L2 reflected by the bar code 31 and traveled with the laser beam L2 scanned.
The photoelectric converting unit 35 is formed of a photoelectric converting element, for example, a photo diode. The photoelectric converting unit 35 also receives the reflected light R2 (light input signal) via the scanning mechanism 34 to convert it into an electric signal (analog value) corresponding to the light amount thereof.
The A/D converter unit 36 digitizes the electric signal from the photoelectric converting unit 35 to convert it into a binary signal including a black level signal corresponding to each black portion and a white level signal corresponding to each white portion in the bar code 31. The white level signal represents a high level signal and the black level signal represents a low level signal because the light amount of the reflected light R2 reflected by each white bar is larger than that of the reflected light R2 reflected by each black bar in the binary signal.
Numeral 37 represents a bar width counter for counting clock signals from the clock generator 38. The bar width counter 37 also outputs as a clock signal count value the time widths of the black level signal portion and the white level signal portion of a binary signal from the A/D converter unit 36, or each black bar width and each white bar width of an actual bar code 31.
Furthermore, the memory 39 stores the bar width count value from the bar width counter 37. The CPU 40 extracts and decodes predetermined data of the bar code 31 based on the bar width count value (a value corresponding to each black bar width or each white bar width) stored in the memory 39.
In the above structure, the scanning mechanism 34 irradiates the laser beam L1 emitted from the laser emitting unit 33 as the laser beam L2 to the black bar and the white bar of the bar code 31 while it moves and scans the laser beam at a constant rate and in the direction perpendicular to the black bar and white bar of the bar code 31.
The laser beam L2 emitted from the scanning mechanism 34 is scatteringly reflected on a portion of the bar code 31 and is re-irradiated as the reflected light R1 to the scanning mechanism 34. The reflected light R1 varies its reflection angle as the laser beam L2 scans and moves. However the polygon mirror constituting the scanning mechanism 34 reflects the reflected light R1 to input it as the reflected light R2 to the photoelectric element in the photoelectric converting unit 35 arranged at a predetermined place.
The photoelectric converting unit 35 converts the reflected light R2 to an electric signal corresponding to the amount thereof. The A/D converter unit 36 digitizes the electric signal into a binary signal including a black level signal corresponding to each black level portion and a white level signal corresponding to each white level portion of the bar code 31.
The A/D converter unit 36 produces a digital signal as a binary signal. The bar width counter 37 counts clock signals from the clock generator 38 so that the time width (a value corresponding to the widths of each black bar and each white bar of an actual bar code 31) of the black level signal portion and the white level signal portion of the binary signal from the A/D converter unit 36 is measured as a clock signal count value. The memory 39 stores temporarily the count value. The CPU 40 subjects the bar width count value stored in the memory 39 to a predetermined decoding process to extract and decode the determined data of the bar code 31.
FIG. 13 is a diagram showing a bar code reader which converts an electrical signal (analog signal) corresponding to the amount of the light R2 reflected from the photoelectric converting unit 35 into a binary signal to store in the memory 39.
As shown in FIG. 13, the bar code reader is constituted of the bar code information detection unit 41 in the photoelectric converting unit 35, the A/D converting unit 36, the binary data converting unit 42 having the comprehensive function of the bar width counter 37 and the clock 38, and the FIFO (first-in first-out) memory 43 acting as the memory 39.
In such a structure, the bar code information detecting unit 41 first detects the bright and dark information on the bar width of the bar code 31 as an analog signal. Next the binary data converting unit 42 converts the analog signal into binary data to store sequentially in the FIFO memory 43.
The binary data stored in the FIFO memory 43 includes a large amount of the so-called trash data, or data being not the bar width bright and dark information of the bar code 31. For example, noises due to stains on the paper on which the bar code 31 is printed may be outputted as a bar width detection signal.
However, in the above bar code reading method and the bar code reader, there is a problem that if the bar code information read should include a large amount of trash data, it is difficult to find quickly normal bar code data and the decreased normal bar code storage efficiency degrades the reliability of the bar code reader.
The present invention is made to overcome the above described problems. An object of the present invention is to provide a bar code reading method which provides an improved bar code reading rate and an improved effective bar code storage efficiency by detecting trash data so as not to store them in a memory.
Another object of the present invention is to provide a bar code reader which provides an improved bar code reading rate and an improved effective bar code storage efficiency by detecting trash data so as not to store them in a memory.
In order to achieve the above object, according to the present invention, the bar code reading method is characterized by the steps of detecting bright and dark information of a bar width based on a bar code; converting the detected bright and dark information into binary information; storing plural pieces of the converted binary information; sequentially outputting the plural pieces of the binary information on a first-in, first-out basis; detecting binary information as error information when plural pieces of bar code bright and dark information do not come alternately in a binary information storing operation; and storing only the last data of plural pieces of binary information detected continuously when plural pieces of error information are continuously detected, and erasing the other information.
A bar code reader of the present invention is characterized by bright and dark information detector for detecting bright and dark information of a bar width based on a bar code; binary information converting means for converting the detected bright and dark information detected by the bright and dark information detector into binary information; binary information storing means for storing plural pieces of binary information converted by the bar width counter and sequentially outputting the plural pieces of binary information on a first-in, first-out basis; error information detecting means for detecting as error information the binary information detected continuously when the plural pieces of bar code bright and dark information do not come alternately in order to store in the binary information storing means; and first control means for controllably storing only the last one of plural pieces of binary information detected continuously in the binary information storing means when the error information detecting means continuously detects the error information.
Moreover according to a bar code reader of the present invention, the first control means erases a previous one of plural pieces of binary information sent continuously when the error information detecting means continuously detects the error information.
According to the present invention, a bar code reading method is characterized by the steps of: detecting bright and dark information of a bar width based on a bar code; converting the detected bright and dark information into binary information; storing plural pieces of the converted binary information; sequentially outputting the plural pieces of binary information in a first-in, first-out basis; counting the size of binary information to be stored; and storing only the last binary information of binary information sent continuously when plural pieces of binary information having at least a predetermined value come continuously, and erasing the remaining information.
According to the present invention, a bar code reader is characterized by bright and dark information detector for detecting bright and dark information of a bar width based on a bar code; bar width counter for converting the detected bright and dark information detected by the bright and dark information detector into binary information; binary information storing means for storing plural pieces of binary information converted by the bar width counter and sequentially outputting the plural pieces of binary information on a first-in, first-out basis; overflow detector for counting the size of binary information to be stored; second control means for controlling so as to store only the last one of the continuously sent binary information in the binary information storing means when plural pieces of binary information counted by the detector come continuously, each of the plural pieces of binary information having a value larger than a predetermined value.
A bar code reader according to the present invention is further characterized by second control means which erases a previous one of the continuously sent binary information when the counting means counts continuously plural pieces of binary information each having a value larger than a predetermined value.
A bar code reading method of the present invention is characterized by the steps of detecting bright and dark information of a bar width based on a bar code; converting the detected bright and dark information into binary information; storing plural pieces of the converted binary information; sequentially outputting the plural pieces of binary information on a first-in, first-out basis; detecting the binary information as error information when the bar code bright and dark information does not come alternately in a binary information storing operation; storing only the last data of plural pieces of binary information sent continuously when the error information are continuously detected, and erasing the remaining information; and storing only the last binary information of plural pieces of binary information sent continuously when plural pieces of binary information to be stored having at least a predetermined value are continuously counted, and erasing the remaining information.
A bar code reader of the present invention is characterized by bright and dark information detector for detecting bright and dark information of a bar width based on a bar code; bar width counter for converting the detected bright and dark information detected by said bright and dark information detector into binary information; binary information storing means for storing plural pieces of binary information converted by said bar width counter and sequentially outputting the plural pieces of binary information on a first-in, first-out basis; error information detecting means for detecting as error information the binary information sent continuously when plural pieces of bar code bright and dark information do not come alternately in order to store in the binary information storing means; overflow detector the size of binary information to be stored; and third control means for controllably storing only the last one of the plural pieces of binary information sent continuously in the binary information storing means when the error information detecting means continuously detects the error information, and for controllably storing only the last one of the plural pieces of binary information sent continuously in the binary information storing means when the overflow detector continuously counts binary information having a value larger than a predetermined value.
According to a bar code reader of the present invention, the third control means erases a previous one of plural pieces of binary information sent continuously when the error information detecting means continuously detects the error information and erases a previous one of plural pieces of binary information sent continuously when the overflow detector continuously counts plural pieces of binary information each having a value larger than a predetermined value.
Therefore, the bar code reading method and the bar code reader of the present invention provide the following functions and advantages:
(1) Since noises in the bar code are erased in the bar code reading area, the bar code reading rate and the effective bar code data storage efficiency can be improved.
(2) Since noises which are included in an analog signal as bright and dark information on a detected bar width are erased outside the bar code reading area, the bar code reading rate and the effective bar code data storage efficiency can be improved.
(3) Since noises produced within and outside the bar code reading area are comprehensively erased, an improved bar code reading rate and an improved bar code data storage efficiency can be obtained. As a result, the reduced amount of memory occupation leads to a reduced memory manufacturing cost.